package dataImport.model;

import dataImport.model.abstracts.AbstractEntity;


public class Command extends AbstractEntity {

	private static final long serialVersionUID = -316333787613748259L;

	private String pattern;

	public Command(final String id, final String pattern) {
		super(id);
		this.pattern = pattern;
	}

	public String getPattern() {
		return this.pattern;
	}

	public void setPattern(String pattern) {
		this.pattern = pattern;
	}

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = super.hashCode();
		result = prime * result + ((this.pattern == null) ? 0 : this.pattern.hashCode());
		return result;
	}

	@Override
	public boolean equals(java.lang.Object obj) {
		if (this == obj) {
			return true;
		}
		if (!super.equals(obj)) {
			return false;
		}
		if (this.getClass() != obj.getClass()) {
			return false;
		}
		Command other = (Command) obj;
		if (this.pattern == null) {
			if (other.pattern != null) {
				return false;
			}
		}
		else if (!this.pattern.equals(other.pattern)) {
			return false;
		}
		return true;
	}
}
